package it.duecaffe.claysoftware.interventi.client.handler;

import com.google.gwt.event.shared.GwtEvent;

public class LoginEvent extends GwtEvent<ClayEventHandler> {
	
	private String username;
	private String password;
	
	public static Type<ClayEventHandler> TYPE = new Type<ClayEventHandler>();
	
	public LoginEvent(String username, String password) {
		this.username = username;
		this.password = password;
	}

	@Override
	public Type<ClayEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(ClayEventHandler handler) {
		handler.onLogin(this);
	}
	
	public String getUsername() {
		return username;
	}
	public String getPassword() {
		return password;
	}
}
